1. Field of the Invention
The invention relates to techniques for controlling operation of memory devices, and was developed by paying specific attention to the possible application in NAND flash memories that store information in NAND cells.
2. Description of the Related Art
In embedded operating systems, file systems read and write data in small blocks of a hard disk called “sectors”, typically of the size of 512 bytes.
In some embedded systems, rather than in the hard disk, the data are saved in NAND flash memories.
The designation “NAND” derives form the specific matrix-like organization (specifically related to the bit lines) of connecting the floating gate cells of the same string (typically 11 or 32) in series (between a drain switch—connected to the bit line—and a source switch). This implies a specific truth table for reading. In fact for reading a given cell in the string (the other strings being de-selected by the corresponding drain selector) it is necessary to activate all the other word lines in order to avoid that any cell that is turned off in parallel to the cell addressed may open the circuit.
This has to be construed in respect of NOR memory cells, where each single cell has a drain terminal directly connected to the bit line, whereby all the cells coming down to the same bit line are addressed in parallel towards the source terminal at ground voltage (and selected by activating only the corresponding word line, with all the other word lines to ground, in order to de-activate non-addressed cells.
By considering the case of two cells only (A addressed and B non-addressed) in a bit line or in a string the corresponding truth table is:
NOR:
ABORNOR0001useful for reading1010useful for reading01101110
There one sees that for reading the cell A it is necessary to turn out (0) the B cell(s) connected in parallel thereto; this is effected by keeping to ground the word lines for B.
In fact, if the cell B absorbs current (1), it is not possible to ascertain whether the cell A is absorbing current (1) or not (0).
NAND:
ABANDNAND000110010101useful for reading1110useful for reading
There one sees that for reading the cell A it is necessary to turn on (1) the B cell(s) connected in series thereto; this is effected by “raising” the word lines for B above the maximum threshold voltage.
In fact, if the cell B does not absorb any current (0), it is not possible to ascertain whether the cell A is absorbing current (1) or not (0) because otherwise the circuit would be interrupted.
Unlike hard disks, NAND flash memories can only be programmed one page at a time and they can only be re-programmed after the entire block containing the page to be re-programmed, has been erased.
In order to render less evident the difference in the physical organization of the various memory devices, a so-called Translation Layer can be used between the file system and the storage media to mask the differences. Several Translation Layer solutions simulate the rewrite operation of a page by writing new data updates in different locations, keeping track of the last (valid) page rewrite operation (e.g. document U.S. Pat. No. 5,740,395).
Many solutions use a Translation Table that associates virtual blocks to physical blocks in a flash memory (e.g. documents U.S. Pat. Nos. 6,374,324; 5,634,050; 5,930,815; 6,581,132; 6,594,183). Generally, each entry of the Translation Table contains a Physical Block Number. Such table is built at device formatting time, so the translation between Virtual Blocks (VB) and Physical Blocks (PB) is defined.
Other prior art methods, simulate a page rewrite operation in a virtual block by performing “writes” in a different block. Each block involved in this operation contains the information (link information) necessary to reach any other block involved (U.S. Pat. Nos. 6,374,324; 5,930,815). With such a system, each sector read operation involves multiple sector read operations. In fact, each previous (invalid) “writes”, of searched sector, must be read in order to reach the last (valid) “write” of requested sector.
This approach requires repeatedly reading the link information for each read/write operation. Therefore, read/write throughput is adversely affected by these additional operations. Specifically, the method described may read all the link information at device power on. After that, the link information can be read from the RAM and the read/write throughput is improved. This method writes the position of the new page version in the spare area of the old version of a page (e.g. U.S. Pat. Nos. 6,374,324; 5,930,815). In this way, reading a page requires reading the spare area of each page that represents a previous version thereof.
Several techniques write a sort of header information in each block (e.g. U.S. Pat. Nos. 5,867,641; 5,634,050; 5,535,369). Typically, this header is written when the block is written for the first time. The header contains the Virtual Block Number of the Virtual Block to which it refers and other useful information. These techniques write the header in the first spare area at device formatting time or when the block is used for the first time. In both cases, the spare area of the first page is used even if the first page is not written yet. Therefore, the first spare area will be written once and (due to NAND flash characteristics) only another write operation will be permitted in that area.
Still other methods write in the spare area of a page to indicate the status of the page itself; multiple spare writes are thus required to store page status change.